#script to create a survey database for servlet example

CREATE DATABASE IF NOT EXISTS colorsurvey;

USE colorsurvey;

DROP TABLE IF EXISTS surveyresults;

CREATE TABLE surveyresults (
	id INT NOT NULL ,
	surveyoption varchar (20) NOT NULL ,
	votes INT NOT NULL ,
	PRIMARY KEY (id)
);


insert into surveyresults (id,surveyoption,votes) values (1, 'Blue', 0);
insert into surveyresults (id,surveyoption,votes) values (2, 'Red', 0);
insert into surveyresults (id,surveyoption,votes) values (3, 'Green', 0);
insert into surveyresults (id,surveyoption,votes) values (4, 'Yellow', 0);
insert into surveyresults (id,surveyoption,votes) values (5, 'Purple', 0);
insert into surveyresults (id,surveyoption,votes) values (6, 'Orange',0);
insert into surveyresults (id,surveyoption,votes) values (7, 'Other',0);

select *
from surveyresults;

